<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:cc="http://java.sun.com/jsf/composite/customcomponents"
	contentType="text/html">
	
	<h:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title><h:outputText value="#{label['ExampleFunctions.title']} - #{label['appNameTitle']}"/></title>
		
		<style>
			.panelGridCenter {
	    		margin: 0 auto;
			}		
		</style>
	</h:head>	
	<h:body>
		<cc:LatamHeader userInfo="true">
			<cc:AppHeaderMenu/>
		</cc:LatamHeader>	
		<p:growl id="growl" severity="info,error,warn"/>		
		<p:panel styleClass="latam_body_panel">
			<p:fieldset legend="#{label['label.upload.file']}" toggleable="false" collapsed="false">
				<h:form>
					<p:panel styleClass="no-border">
						<p:panelGrid columns="2" styleClass="panelGridCenter">
							<p:fileUpload 																	
			            		fileUploadListener="#{exampleFileManager.uploadFile}"
			            		label="#{label['ExampleFunctions.files.upload']}"
			            		multiple="true"
			            		auto="true"
			            		showButtons="false"
			            		mode="advanced"
			            		update="@all"/>
<!-- 							<p:commandButton value="#{label['ExampleFunctions.files.download']}"  -->
<!-- 								onclick="PrimeFaces.monitorDownload( showDownloadDialog, hideDownloadStop );" -->
<!-- 								ajax="false" update="@all"> -->
<!-- 								<p:fileDownload value="#{exampleFileManager.file}"/> -->
<!-- 							</p:commandButton>												            			 -->
						</p:panelGrid>
					</p:panel>
				</h:form>				
			</p:fieldset>
		</p:panel>
<!-- 		<p:dialog modal="true" widgetVar="downloadDialog" header="#{label['ExampleFunctions.files.generating']}" draggable="false" closable="false" resizable="false"> -->
<!-- 			<center>   -->
<!--    				<p:graphicImage value="/resources/images/ajax-loader.gif" /> -->
<!--    				<p:outputLabel value="#{label['ExampleFunctions.files.generating']}"/> -->
<!--    			</center>   -->
<!-- 		</p:dialog> -->
		<script type="text/javascript">  
			function showDownloadDialog() {  
				downloadDialog.show();  
			}  
			  
			function hideDownloadStop() {  
				downloadDialog.hide();  
			}  
		</script>
		<cc:LatamFooter/>
	</h:body>
</f:view>